package 反转字符串;

/**
 * @author zhengTao
 * @version 1.0
 * @description: 反转字符串
 * @date 2022/10/22 16:04
 */
public class Demo344 {
    public static void main(String[] args) {

    }
    public void reverseString(char[] s) {
        int start=0;
        int end=s.length-1;
        while (start<end){
            char temp=s[start];
            s[start++]=s[end];
            s[end--]=temp;
        }
    }
}
